package cc.comac.mom.api;

import java.io.IOException;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import cc.comac.mom.bean.EquipSparePartsType;
import cc.comac.mom.bean.ResultDev;
import cc.comac.mom.util.ResultBean;
@FeignClient(name = "mom-equipment-mgmt-srv")
public interface EquipSparePartsTypeService {
	
	@RequestMapping(value = "/p/cs/EquipSparePartsTypeService/save",method = RequestMethod.POST)
	ResultBean save(@RequestBody EquipSparePartsType obj);
	
	@RequestMapping(value = "/p/cs/EquipSparePartsTypeService/update",method = RequestMethod.POST)
	ResultBean update(@RequestBody EquipSparePartsType obj);
	
	@RequestMapping(value = "/p/cs/EquipSparePartsTypeService/getAllEnable",method = RequestMethod.POST)
	ResultBean getAllEnable();
	
	@RequestMapping(value = "/p/cs/EquipSparePartsTypeService/deleteBatch",method = RequestMethod.POST)
	ResultBean deleteBatch(@RequestBody List<EquipSparePartsType> list);
	
	@RequestMapping(value = "/p/cs/EquipSparePartsTypeService/getById",method = RequestMethod.POST)
	EquipSparePartsType getById(@RequestBody EquipSparePartsType obj);
	
	@RequestMapping(value = "/p/cs/EquipSparePartsTypeService/selectByCondition",method = RequestMethod.POST)
	ResultDev selectByCondition(@RequestBody EquipSparePartsType obj);
	
	@RequestMapping(value = "/p/cs/EquipSparePartsTypeService/importSparePartsType",consumes = MediaType.MULTIPART_FORM_DATA_VALUE,method = RequestMethod.POST)
	ResultBean importSparePartsType(@RequestPart("file") MultipartFile file,@RequestParam(value ="rootPath" ) String rootPath)throws IOException;
	
	@RequestMapping(value = "/p/cs/EquipSparePartsTypeService/exportData",method = RequestMethod.POST)
	String exportData(@RequestParam(value ="request" ) HttpServletRequest request, @RequestParam(value ="response" ) HttpServletResponse response,@RequestBody EquipSparePartsType obj) throws IOException;
}
